﻿
using System ;
using System.Windows.Forms ;

using MskEdit.Dxf.Model ;


namespace MskEdit.Dxf.Frontend
{

    public class DxfClassTreeNode : TreeNode 
    {
        private DxfClass dxfClass_ ;
        
        
        public static DxfClassTreeNode TryFrom( DxfClass dxfClass, DxfClassTreeNode fallbackValue ) {
        
            if ( dxfClass == null )
                return fallbackValue ;
                
            return new DxfClassTreeNode( dxfClass ) ;
        }
        
        
        public DxfClassTreeNode( DxfClass dxfClass ) {
        
            dxfClass_ = dxfClass ;
            this.Text = dxfClass.Name ;
        }
    }
}
